package net.cloudbusniness.cloudbusinessclient.mobieimsdk;

import android.util.Log;

import net.cloudbusniness.cloudbusinessclient.application.AppInstance;
import net.openmob.mobileimsdk.android.event.ChatBaseEvent;

/**
 * Created by hulei on 2017/2/17.
 * 框架基本事件回调实现类：
 */
public class ChatBaseEventImpl implements ChatBaseEvent

{
    private String TAG = AppInstance.TAG;
    // 登陆/掉线重连结果通知
    @Override
    public void onLoginMessage(int dwUserId, int dwErrorCode)
    {
        if (dwErrorCode == 0)
            Log.i(TAG, "登录成功，当前分配的user_id="+dwUserId);
        else
            Log.i(TAG, "登录失败，错误代码：" + dwErrorCode);
    }

    // 掉线事件通知
    @Override
    public void onLinkCloseMessage(int dwErrorCode)
    {
        Log.i(TAG, "网络连接出错关闭了，error：" + dwErrorCode);
    }
}
